package com.gwq.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gwq.computedUtils.NewExercise;
import com.gwq.dto.ComputedDto;
import com.gwq.entity.Equation;
import com.gwq.mapper.ComputedMapper;
import com.gwq.param.ExerciseParam;
import com.gwq.service.ComputedService;
import com.gwq.service.ComputerService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Service
@Slf4j
public class ComputerServicelmpl extends ServiceImpl<ComputedMapper, Equation> implements ComputerService {





    @Async("taskExecutor")
    public void addEx(List<Equation> equations,String exId){
        equations.stream().forEach(o->{
            o.setExercisesId(exId);
        });
        saveBatch(equations);
    }



}
